Change in openvpn[master]: Log setting DNS via NRPT
A message that is not in the archive (sent off-list or not yet received): gerrit.1754040821000.Ib2f30fe69cb676e347e4d59cd2db68db7568ba5b@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email
to review the following change.
Change subject: Log setting DNS via NRPT
......................................................................
Log setting DNS via NRPT
Unlike other ways of setting DNS, we don't log anything when we use NRPT. Since dco-win/--dns is the recommended configuration and it uses NRPT to set DNS, let's log it.
---
M src/openvpn/dns.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/26/1126/1
src/openvpn/dns.c +5 -0
@@ -461,6 +461,11 @@make_domain_list ("dns search domains" , search_domains, false, nrpt.search_domains,sizeof (nrpt.search_domains)); +msg (D_LOW ,"%s NRPT DNS%s%s on '%s' (if_index = %d) using service" , + (add ?"Setting" :"Deleting" ), nrpt.resolve_domains[0 ] !=0 ?", resolve domains" :"" , + nrpt.search_domains[0 ] !=0 ?", search domains" :"" , + nrpt.iface.name, nrpt.iface.index); +send_msg_iservice (o->msg_channel, &nrpt,sizeof (nrpt), &ack,"DNS" ); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f30fe69cb676e347e4d59cd2db68db7568ba5b
Gerrit-Change-Number: 1126
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos, stipa.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email )
Change subject: Log setting DNS via NRPT
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f30fe69cb676e347e4d59cd2db68db7568ba5b
Gerrit-Change-Number: 1126
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Sun, 03 Aug 2025 14:49:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH 1/1 Log setting DNS via NRPT
In reply to a message not in the archiveFrom: Lev Stipakov <[email protected]...>
Unlike other ways of setting DNS, we don't log anything when we use NRPT. Since dco-win/--dns is the recommended configuration and it uses NRPT to set DNS, let's log it.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1126
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/dns.c +5 -0
@@ -461,6 +461,11 @@make_domain_list ("dns search domains" , search_domains, false, nrpt.search_domains,sizeof (nrpt.search_domains)); +msg (D_LOW ,"%s NRPT DNS%s%s on '%s' (if_index = %d) using service" , + (add ?"Setting" :"Deleting" ), nrpt.resolve_domains[0 ] !=0 ?", resolve domains" :"" , + nrpt.search_domains[0 ] !=0 ?", search domains" :"" , + nrpt.iface.name, nrpt.iface.index); +send_msg_iservice (o->msg_channel, &nrpt,sizeof (nrpt), &ack,"DNS" ); }
[Openvpn-devel] [PATCH applied] Re: Log setting DNS via NRPT
Looks good, and is a useful addition.
I haven't actually run the resulting binary yet (too lazy), but counted the arguments (twice!) and test compiled with mingw/ubuntu22 to see if the compiler disagrees.
Your patch has been applied to the master branch.
commit ff371d1aaa71ef89157ba89b8c992494bac31b34
Author: Lev Stipakov Date: Sun Aug 3 16:49:45 2025 +0200
Log setting DNS via NRPT
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32480.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: Log setting DNS via NRPT
......................................................................
Log setting DNS via NRPT
Unlike other ways of setting DNS, we don't log anything when we use NRPT. Since dco-win/--dns is the recommended configuration and it uses NRPT to set DNS, let's log it.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32480.html
---
M src/openvpn/dns.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/26/1126/2
src/openvpn/dns.c +5 -0
@@ -460,6 +460,11 @@make_domain_list ("dns search domains" , search_domains, false, nrpt.search_domains,sizeof (nrpt.search_domains)); +msg (D_LOW ,"%s NRPT DNS%s%s on '%s' (if_index = %d) using service" , + (add ?"Setting" :"Deleting" ), nrpt.resolve_domains[0 ] !=0 ?", resolve domains" :"" , + nrpt.search_domains[0 ] !=0 ?", search domains" :"" , + nrpt.iface.name, nrpt.iface.index); +send_msg_iservice (o->msg_channel, &nrpt,sizeof (nrpt), &ack,"DNS" ); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f30fe69cb676e347e4d59cd2db68db7568ba5b
Gerrit-Change-Number: 1126
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email )
Change subject: Log setting DNS via NRPT
......................................................................
Log setting DNS via NRPT
Unlike other ways of setting DNS, we don't log anything when we use NRPT. Since dco-win/--dns is the recommended configuration and it uses NRPT to set DNS, let's log it.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32480.html
---
M src/openvpn/dns.c
1 file changed, 5 insertions(+), 0 deletions(-)
src/openvpn/dns.c +5 -0
@@ -460,6 +460,11 @@make_domain_list ("dns search domains" , search_domains, false, nrpt.search_domains,sizeof (nrpt.search_domains)); +msg (D_LOW ,"%s NRPT DNS%s%s on '%s' (if_index = %d) using service" , + (add ?"Setting" :"Deleting" ), nrpt.resolve_domains[0 ] !=0 ?", resolve domains" :"" , + nrpt.search_domains[0 ] !=0 ?", search domains" :"" , + nrpt.iface.name, nrpt.iface.index); +send_msg_iservice (o->msg_channel, &nrpt,sizeof (nrpt), &ack,"DNS" ); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1126?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f30fe69cb676e347e4d59cd2db68db7568ba5b
Gerrit-Change-Number: 1126
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged